

<!doctype html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <!-- Apple devices fullscreen -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <!-- Apple devices fullscreen -->
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" media="screen" />
    <link href="/public/plugins/layui/css/layui.css?v=v1.6.3" rel="stylesheet" type="text/css">
    <link href="/public/static/admin/css/main.css?v=v1.6.3" rel="stylesheet" type="text/css">
    <link href="/public/static/admin/css/page.css?v=v1.6.3" rel="stylesheet" type="text/css">
    <link href="/public/static/admin/font/css/font-awesome.min.css?v=v1.6.3" rel="stylesheet" />
    <link href="/public/static/admin/font/css/iconfont.css?v=v1.6.3" rel="stylesheet" />
    <!--[if IE 7]>
  <link rel="stylesheet" href="/public/static/admin/font/css/font-awesome-ie7.min.css?v=v1.6.3">
<![endif]-->
    <script type="text/javascript">
        var eyou_basefile = "/login.php";
        var module_name = "admin";
        var GetUploadify_url = "/uploads.html";
         // 插件专用旧版上传图片框
        if ('Weapp@execute' == "Archives@index_archives") {
            GetUploadify_url = "/uploads.html";
        }
        var __root_dir__ = "";
        var __lang__ = "cn";
        var __seo_pseudo__ = 1;
        var __web_xss_filter__ = 0;
        var __is_mobile__ = 0;
        var __security_ask_open__ = 0;
    </script>
    <link href="/public/static/admin/js/jquery-ui/jquery-ui.min.css?v=v1.6.3" rel="stylesheet" type="text/css" />
    <link href="/public/static/admin/js/perfect-scrollbar.min.css?v=v1.6.3" rel="stylesheet" type="text/css" />
    <!-- <link type="text/css" rel="stylesheet" href="/public/plugins/tags_input/css/jquery.tagsinput.css?v=v1.6.3"> -->
    <style type="text/css">
        html, body {
    overflow: visible;
}
    </style>
    <link href="/public/static/admin/css/diy_style.css?v=v1.6.3" rel="stylesheet" type="text/css" />
    <!-- 官方内置样式表，升级会覆盖变动，请勿修改，否则后果自负 -->
    <style type="text/css">
        /*左侧收缩图标*/
#foldSidebar i {
    font-size: 24px;
    color: #3398cc;
}
    /*左侧菜单*/
.eycms_cont_left {
    background: #3398cc;
}

.eycms_cont_left dl dd a:hover,.eycms_cont_left dl dd a.on,.eycms_cont_left dl dt.on {
    background: #2189be;
}

.eycms_cont_left dl dd a:active {
    background: #2189be;
}

.eycms_cont_left dl.jslist dd {
    background: #3398cc;
}

.eycms_cont_left dl.jslist dd a:hover,.eycms_cont_left dl.jslist dd a.on {
    background: #2189be;
}

.eycms_cont_left dl.jslist:hover {
    background: #2189be;
}
    /*栏目操作*/
.cate-dropup .cate-dropup-con a:hover {
    background-color: #3398cc;
}
    /*按钮*/
a.ncap-btn-green {
    background-color: #3398cc;
}

a:hover.ncap-btn-green {
    background-color: #2189be;
}

.flexigrid .sDiv2 .btn:hover {
    background-color: #3398cc;
}

.flexigrid .mDiv .fbutton div.add {
    background-color: #3398cc;
    border: none;
}

.flexigrid .mDiv .fbutton div.add:hover {
    background-color: #2189be;
}

.flexigrid .mDiv .fbutton div.adds {
    color: #3398cc;
    border: 1px solid #3398cc;
}

.flexigrid .mDiv .fbutton div.adds:hover {
    background-color: #3398cc;
}
    /*选项卡字体*/
.tab-base a.current,
    .tab-base a:hover.current {
    color: #3398cc !important;
}

.tab-base a.current:after,
    .tab-base a:hover.current:after {
    background-color: #3398cc;
}

.addartbtn input.btn:hover {
    border-bottom: 1px solid #3398cc;
}

.addartbtn input.btn.selected {
    color: #3398cc;
    border-bottom: 1px solid #3398cc;
}
	/*会员导航*/
.member-nav-group .member-nav-item .btn.selected {
    background: #3398cc;
    border: 1px solid #3398cc;
    box-shadow: -1px 0 0 0 #3398cc;
}

.member-nav-group .member-nav-item:first-child .btn.selected {
    border-left: 1px solid #3398cc !important;
}
	/*搜索按钮图标*/
.flexigrid .sDiv2 .fa-search {
}
        
    /* 商品订单列表标题 */
.flexigrid .mDiv .ftitle h3 {
    border-left: 3px solid #3398cc;
} 
	
    /*分页*/
.pagination > .active > a, .pagination > .active > a:focus, 
	.pagination > .active > a:hover, 
	.pagination > .active > span, 
	.pagination > .active > span:focus, 
	.pagination > .active > span:hover {
    border-color: #3398cc;
    color: #3398cc;
}

.layui-form-onswitch {
    border-color: #3398cc !important;
    background-color: #3398cc !important;
}

.onoff .cb-enable.selected {
    background-color: #3398cc !important;
    border-color: #3398cc !important;
}

.onoff .cb-disable.selected {
    background-color: #3398cc !important;
    border-color: #3398cc !important;
}

.pcwap-onoff .cb-enable.selected {
    background-color: #3398cc !important;
    border-color: #3398cc !important;
}

.pcwap-onoff .cb-disable.selected {
    background-color: #3398cc !important;
    border-color: #3398cc !important;
}

input[type="text"]:focus,
    input[type="text"]:hover,
    input[type="text"]:active,
    input[type="password"]:focus,
    input[type="password"]:hover,
    input[type="password"]:active,
    textarea:hover,
    textarea:focus,
    textarea:active {
    border-color: rgba(51,152,204,0.8);
    box-shadow: 0 0 0 1px rgba(51,152,204,0.5) !important;
}

.input-file-show:hover .type-file-button {
    background-color: #3398cc !important;
}

.input-file-show:hover {
    border-color: #3398cc !important;
    box-shadow: 0 0 5px rgba(51,152,204,0.5) !important;
}

.input-file-show:hover span.show a,
    .input-file-show span.show a:hover {
    color: #3398cc !important;
}

.input-file-show:hover .type-file-button {
    background-color: #3398cc !important;
}

.color_z {
    color: #3398cc !important;
}

a.imgupload {
    background-color: #3398cc !important;
    border-color: #3398cc !important;
}
    /*专题节点按钮*/
.ncap-form-default .special-add {
    background-color: #3398cc;
    border-color: #3398cc;
}

.ncap-form-default .special-add:hover {
    background-color: #2189be;
    border-color: #2189be;
}
    
    /*更多功能标题*/
.on-off_panel .title::before {
    background-color: #3398cc;
}

.on-off_panel .on-off_list-caidan .icon_bg .on {
    color: #3398cc;
}

.on-off_panel .e-jianhao {
    color: #3398cc;
}
    
     /*内容菜单*/
.ztree li a:hover {
    color: #3398cc !important;
}

.ztree li a.curSelectedNode {
    background-color: #3398cc !important;
    border-color: #3398cc !important;
}

.layout-left .on-off-btn {
    background-color: #3398cc !important;
}

.iframe_loading {
    width: 100%;
    background: url(/public/static/admin/images/loading-0.gif) no-repeat center center;
}

.layui-btn-normal {
    background-color: #3398cc;
}

    
    /* 商品规格按钮 */
    /* .preset-bt{border-color: #3398cc !important;background:#3398cc;} */
    </style>
    <script type="text/javascript" src="/public/static/admin/js/jquery.js?v=v1.6.3"></script>
    <!-- <script type="text/javascript" src="/public/plugins/tags_input/js/jquery.tagsinput.js?v=v1.6.3"></script> -->
    <script type="text/javascript" src="/public/static/admin/js/jquery-ui/jquery-ui.min.js?v=v1.6.3"></script>
    <script type="text/javascript" src="/public/plugins/layer-v3.1.0/layer.js?v=v1.6.3"></script>
    <script type="text/javascript" src="/public/static/admin/js/jquery.cookie.js?v=v1.6.3"></script>
    <script type="text/javascript" src="/public/static/admin/js/admin.js?v=v1.6.3"></script>
    <script type="text/javascript" src="/public/static/admin/js/jquery.validation.min.js?v=v1.6.3"></script>
    <script type="text/javascript" src="/public/static/admin/js/common.js?v=v1.6.3"></script>
    <script type="text/javascript" src="/public/static/admin/js/perfect-scrollbar.min.js?v=v1.6.3"></script>
    <script type="text/javascript" src="/public/static/admin/js/jquery.mousewheel.js?v=v1.6.3"></script>
    <script type="text/javascript" src="/public/plugins/layui/layui.js?v=v1.6.3"></script>
    <script src="/public/static/admin/js/myFormValidate.js?v=v1.6.3"></script>
    <script src="/public/static/admin/js/myAjax2.js?v=v1.6.3"></script>
    <script src="/public/static/admin/js/global.js?v=v1.6.3"></script>
    
    
    <link href="css/index.css" rel="stylesheet" type="text/css" />
    <script src="js/vue.min.js"></script>
    <script src="js/vue-resource.min.js"></script>
    <script src="js/index.js"></script>
    
    
</head>

<body style="background: #F5F5F5; overflow: auto; cursor: default; -moz-user-select: inherit;min-width:auto;">
    <div id="append_parent"></div>
    <div id="ajaxwaitid"></div>
    <div style="height: 10px;"></div>
    <div class="page min-hg-c-66" id="app">
        <div class="flexigrid" style="margin-top: 0px;min-height: 600px;">
            <div class="mDiv">
                <div class="ftitle">
                    <!-- 扩展 -->
                    <div class="fbutton" style="float: none;">
                        <a href="/a1.html">
                            <div class="add"> <span><i class="layui-icon layui-icon-addition"></i>发布文档</span>
                            </div>
                        </a>
                    </div>
                    <script type="text/javascript">
                        $(document).ready(function() {
                            $('#searchForm select[name=flag]').change(function() {
                                $('#searchForm').submit();
                            });
                        });

                        function jump_is_release() {
                            var is_release = $('#searchForm input[name=is_release]').val();
                            if (1 == is_release) {
                                $('#searchForm input[name=is_release]').val('');
                            } else {
                                $('#searchForm input[name=is_release]').val('1');
                            }
                            $('#searchForm').submit();
                        }

                        function quick_release(is_arctype) {
                            if (is_arctype && 0 < is_arctype) {
                                //iframe窗
                                layer.open({
                                    type: 2,
                                    title: '快捷发布文档',
                                    fixed: true, //不固定
                                    shadeClose: false,
                                    shade: layer_shade,
                                    maxmin: false, //开启最大化最小化按钮
                                    area: ['600px', '552px'],
                                    content: "/a1.html",
                                    success: function(layero, index) {
                                        // var body = layer.getChildFrame('body', index);
                                        // var gourl = $('.curSelectedNode').attr('href');
                                        // if (!$.trim(gourl)) {
                                        //     gourl = "/login.php?m=admin&c=Archives&a=index_archives&lang=cn";
                                        // }
                                        // body.find('input[name=gourl]').val(gourl);
                                    }
                                });
                            } else {
                                layer.alert('至少要新增一个栏目！', {
                                    shade: layer_shade,
                                    icon: 5,
                                    title: false,
                                    btn: ['进入栏目管理']
                                }, function(index) {
                                    layer.close(index);
                                    /*左侧菜单焦点定位*/
                                    $('.eycms_cont_left .sub-menu a', window.parent.document).removeClass('on');
                                    $('#Arctype_index', window.parent.document).addClass('on');
                                    /*end*/
                                    window.location.href = "/login.php?m=admin&c=Arctype&a=index&lang=cn";
                                });
                            }
                        }
                    </script>
                </div>
                <!--<div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div>-->
                <form id="searchForm" class="navbar-form form-inline" action="" method="get" onSubmit="layer_loading('正在处理');">
                    <input type="hidden" name="m" value="admin">
                    <input type="hidden" name="c" value="Archives">
                    <input type="hidden" name="a" value="index_archives">
                    <input type="hidden" name="lang" value="cn">
                    <div class="sDiv">
                       
                        <div class="sDiv2">
                            <input type="hidden" name="typeid" value="标题搜索...">
                            <input type="text" size="30" name="keywords" v-model="search"  class="qsbox" placeholder="标题搜索...">
                            <input type="submit" class="btn" @click.prevent="mysearch()" value="搜索">	<i class="iconfont e-sousuo"></i>
                        </div>
                    </div>
                </form>
            </div>
            <div class="hDiv">
                <div class="hDivBox">
                    <table cellspacing="0" cellpadding="0" style="width: 100%">
                        <thead>
                            <tr>
                                <th class="sign w40" axis="col0">
                                    <div class="tc">
                                        <input type="checkbox" class="checkAll" autocomplete="off">
                                    </div>
                                </th>
                                <th abbr="article_title" axis="col3" class="w70">
                                    <div class="tc">ID</div>
                                </th>
                                <th abbr="article_title" axis="col3" class="">
                                    <div style="text-align: left;" class="text-l10">标题</div>
                                </th>
                                <!-- <th abbr="article_time" axis="col6" class="w120">
                            <div class="tc">付费限制</div>
                        </th> -->
                                <th abbr="article_time" axis="col6" class="w120">
                                    <div class="tc">栏目</div>
                                </th>
                                <th abbr="article_time" axis="col6" class="w60">
                                    <div class="tc sort_style"><a href="/login.php?m=admin&c=Archives&a=index_archives&lang=cn&orderby=arcrank&orderway=asc">审核&nbsp;<i ></i></a>
                                    </div>
                                </th>
                               
                                <th abbr="article_time" axis="col6" class="w100">
                                    <div class="tc">发布时间</div>
                                </th>
                                <th axis="col1" class="w160">
                                    <div class="tc">操作</div>
                                </th>
                                <th abbr="article_time" axis="col6" class="w60">
                                    <div class="tc sort_style"><a href="/login.php?m=admin&c=Archives&a=index_archives&lang=cn&orderby=sort_order&orderway=asc">排序&nbsp;<i ></i></a>
                                    </div>
                                </th>
                            </tr>
                        </thead>
                    </table>
                </div>
            </div>
            <div class="bDiv" style="height: auto;">
                <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
                    <table style="width: 100%;">
                        <tbody>
                            <tr v-for="vlist in list">
                                <td class="sign">
                                    <div id="aid_105" data-typeid="66" class="tc w40">
                                        <input type="checkbox" name="ids[]" :value="vlist.aid" autocomplete="off">
                                    </div>
                                </td>
                                <td class="sort">
                                    <div class="tc w70">{{vlist.aid}}</div>
                                </td>
                                <td class="" style="width: 100%;">
                                <div class="tl pdl10"> 
                                
                                
                                    <img :src="vlist.litpic" class="layer_tips_img">
                           
                                        <a href="/login.php?m=admin&c=Images&a=edit&id=105&lang=cn" style="">{{vlist.title}}</a>
                                    </div>
                                </td>
                                <!-- <td class="">
                                <div class="w120 tc">
                                    <span style="display: block;">高级会员</span>
                                    <span class="red">￥10.00</span>
                                </div>
                            </td> -->
                                <td class="">
                                    <div class="w120 tc ellipsis"><a href="/login.php?m=admin&c=Archives&a=index_archives&typeid=66&lang=cn" :title="vlist.typename">{{vlist.typename}}</a>
                                    </div>
                                </td>
                                <td>
                                    <div v-if="vlist.arcrank==0" class="tc w60"> <span class="yes" data-typeid="66" data-seo_pseudo="1" onClick="changeTableVal('archives','aid','105','arcrank',this);"><i class="fa fa-check-circle"></i>是</span>
                                    </div>
                                    <div v-else class="tc w60"> <span class="no" data-typeid="66" data-seo_pseudo="1" onClick="changeTableVal('archives','aid','105','arcrank',this);"><i class="fa fa-check-circle"></i>否</span>
                                    </div>
                                </td>
                               
                                <td>
                                    <div class="w100 tc">{{vlist.add_time}}</div>
                                </td>
                                <td class="operation">
                                    <div class="w160 tc"> <a :href="'/a2.html?id='+vlist.aid">编辑</a>
                                        <i></i>
                                        <a class="btn red" href="javascript:;" @click="del(vlist.aid)" data-url="" data-id="105" data-deltype="del" >删除</a>
                                       
                                    </div>
                                </td>
                                <td class="sort">
                                    <div class="w60 tc">
                                        <input type="text"  size="4" :value="vlist.sort_order" />
                                    </div>
                                </td>
                            </tr>
                            
                     
                        </tbody>
                    </table>
                </div>
                <div class="iDiv" style="display: none;"></div>
            </div>
            <div class="footer-oper"> <span class="ml15">
                <input type="checkbox" class="checkAll" autocomplete="off">
            </span>
                <div class="nav-dropup">
                    <button class="layui-btn layui-btn-primary dropdown-bt">批量操作<i class="layui-icon layui-icon-up"></i>
                    </button>
                    <div class="dropdown-menus" style="display:none; "> <a href="javascript:void(0);" onclick="batch_attr(this, 'ids', '批量新增属性');" data-url="/login.php?m=admin&c=Archives&a=batch_attr&opt=add&lang=cn">新增属性</a>
                        <a href="javascript:void(0);" onclick="batch_attr(this, 'ids', '批量删除属性');" data-url="/login.php?m=admin&c=Archives&a=batch_attr&opt=del&lang=cn">删除属性</a>
                        <hr class="layui-bg-gray"> <a href="javascript:void(0);" onclick="func_batch_copy(this, 'ids');" data-url="/login.php?m=admin&c=Archives&a=batch_copy&lang=cn">复制文档</a>
                        <a href="javascript:void(0);" onclick="func_move(this, 'ids');" data-url="/login.php?m=admin&c=Archives&a=move&lang=cn">移动文档</a>
                        <a href="javascript:void(0);" onclick="batch_del(this, 'ids');" data-url="/login.php?m=admin&c=Archives&a=del&lang=cn" data-deltype="del">删除文档</a>
                        <hr class="layui-bg-gray"> <a href="javascript:void(0);" onclick="batch_check(this, 'ids');" data-type="check" data-url="/login.php?m=admin&c=Archives&a=check&lang=cn">审核文档</a>
                        <a href="javascript:void(0);" onclick="batch_check(this, 'ids');" data-type="uncheck" data-url="/login.php?m=admin&c=Archives&a=uncheck&lang=cn">取消审核</a>
                    </div>
                </div>	<a data-url="/login.php?m=admin&c=Archives&a=index_draft&lang=cn" onclick="recycleBin(this)" href="javascript:;" class="layui-btn layui-btn-primary" title="待审核文档">待审核文档</a>
                <div class="fbuttonr">
                    <div class="pages">
                        <div class='dataTables_paginate paging_simple_numbers'>
                            <ul class='pagination'></ul>
                        </div>
                    </div>
                </div>
                <div class="fbuttonr">
                    
                    
                    <el-pagination
                      background
                      layout="prev, pager, next"
                      @current-change="handleCurrentChange"
                      :total="count">
                    </el-pagination>

                    
                    
                    <!--<div class="total">-->
                    <!--    <h5>共有39条,每页显示-->
                    <!--        <select name="pagesize" style="width: 60px;" onchange="ey_selectPagesize(this);">-->
                    <!--            <option  value="20">20</option>-->
                    <!--            <option  value="50">50</option>-->
                    <!--            <option  selected  value="100">100</option>-->
                    <!--            <option  value="200">200</option>-->
                    <!--        </select>-->
                    <!--    </h5>-->
                    <!--</div>-->
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        function recycleBin(obj) {
            var url = $(obj).data("url");
            parent.location = url;
        }
        $(function() {
            $('input[name*=ids]').click(function() {
                if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
                    $('.checkAll').prop('checked', 'checked');
                } else {
                    $('.checkAll').prop('checked', false);
                }
            });
            $('input[type=checkbox].checkAll').click(function() {
                $('input[type=checkbox]').prop('checked', this.checked);
            });
        });
        $(document).ready(function() {
            // 表格行点击选中切换
            $('#flexigrid > table>tbody >tr').click(function() {
                $(this).toggleClass('trSelected');
            });
            // 点击刷新数据
            $('.fa-refresh').click(function() {
                location.href = location.href;
            });
            // 选择栏目检索出相应文档列表
            $('#typeid').change(function() {
                $('#searchForm').submit();
            });
            // 批量操作
            $(".dropdown-bt").click(function() {
                $(".dropdown-menus").slideToggle(200);
                event.stopPropagation();
            })
            $(document).click(function() {
                $(".dropdown-menus").slideUp(200);
                event.stopPropagation();
            })
        });
        var aids = '';

        function func_move(obj, name) {
            var a = [];
            var k = 0;
            aids = '';
            $('input[name^=' + name + ']').each(function(i, o) {
                if ($(o).is(':checked')) {
                    a.push($(o).val());
                    if (k > 0) {
                        aids += ',';
                    }
                    aids += $(o).val();
                    k++;
                }
            })
            if (a.length == 0) {
                layer.alert('请至少选择一项', {
                    shade: layer_shade,
                    area: ['480px', '190px'],
                    move: false,
                    title: '提示',
                    btnAlign: 'r',
                    closeBtn: 3,
                    success: function() {
                        $(".layui-layer-content").css('text-align', 'left');
                    }
                });
                return;
            }
            var url = $(obj).attr('data-url');
            //iframe窗
            layer.open({
                type: 2,
                title: '移动文档',
                fixed: true, //不固定
                shadeClose: false,
                shade: layer_shade,
                maxmin: false, //开启最大化最小化按钮
                area: ['350px', '260px'],
                content: url
            });
        }
        /**
         * 获取修改之前的内容
         */
        function get_aids() {
            return aids;
        }
        var typeid_arr = []; //已经生成过静态的typeid
        var build_finish = false; //是否已经全部生成静态
         //检查是否已经生成静态，刷新页面
        function build_finish_polling() {
            if (build_finish === true) {
                layer.closeAll();
                layer.msg('操作成功', {
                    icon: 1
                });
                window.location.reload();
            }
        }
        /**
         * 批量审核
         */
        function batch_check(obj, name) {
            var url = $(obj).attr('data-url');
            var data_type = $(obj).attr('data-type'); //uncheck
            var a = [];
            $('input[name^=' + name + ']').each(function(i, o) {
                if ($(o).is(':checked')) {
                    a.push($(o).val());
                }
            });
            if (a.length == 0) {
                layer.alert('请至少选择一项', {
                    shade: layer_shade,
                    area: ['480px', '190px'],
                    move: false,
                    title: '提示',
                    btnAlign: 'r',
                    closeBtn: 3,
                    success: function() {
                        $(".layui-layer-content").css('text-align', 'left');
                    }
                });
                return;
            }
            // title = '批量审核';
            // btn = ['确定', '取消']; //按钮
            // // 删除按钮
            // layer.confirm(title, {
            //     title: false,
            //     btn: btn //按钮
            // }, function () {
            layer_loading('正在处理');
            $.ajax({
                type: "POST",
                url: url,
                data: {
                    ids: a,
                    _ajax: 1
                },
                dataType: 'json',
                success: function(data) {
                    if (data.code == 1) {
                        var last = false;
                        if (data_type === 'check') {
                            for (var i = 0; i < a.length; i++) {
                                var id_value = a[i];
                                var typeid = $("#aid_" + id_value).data('typeid');
                                if ((i + 1) == a.length) {
                                    last = true;
                                }
                                up_html(id_value, typeid, last);
                            }
                            window.setInterval(build_finish_polling, 500);
                        } else {
                            layer.closeAll();
                            layer.msg(data.msg, {
                                icon: 1
                            });
                            window.location.reload();
                        }
                    } else {
                        layer.closeAll();
                        layer.alert(data.msg, {
                            icon: 2,
                            title: false
                        });
                    }
                },
                error: function(e) {
                    layer.closeAll();
                    layer.alert(e.responseText, {
                        icon: 2,
                        title: false
                    });
                }
            });
            // }, function (index) {
            //     layer.closeAll(index);
            // });
        }
         //生成静态页面
        function up_html(id_value, typeid, last) {
            $.ajax({
                url: __root_dir__ + "/index.php?m=home&c=Buildhtml&a=upHtml&lang=" + __lang__ + "&id=" + id_value + "&t_id=" + typeid + "&type=view&ctl_name=Archives&_ajax=1",
                type: 'GET',
                dataType: 'json',
                data: {},
                success: function(res1) {
                    //                layer.closeAll();
                    //                layer.msg('生成完成', {icon: 1, time: 1500});
                    if (typeid_arr.indexOf(typeid) === -1) {
                        typeid_arr.push(typeid);
                        $.ajax({
                            url: __root_dir__ + "/index.php?m=home&c=Buildhtml&a=upHtml&lang=" + __lang__ + "&id=" + id_value + "&t_id=" + typeid + "&type=lists&ctl_name=Archives&_ajax=1",
                            type: 'GET',
                            dataType: 'json',
                            data: {},
                            success: function(res2) {
                                if (last === true) {
                                    build_finish = true;
                                }
                                //                        layer.closeAll();
                                //                        layer.msg('生成完成', {icon: 1, time: 1500});
                            },
                            error: function(e) {
                                layer.closeAll();
                                layer.alert('生成当前栏目HTML失败，请手工生成栏目静态！', {
                                    icon: 5,
                                    title: false
                                });
                            }
                        });
                    } else {
                        if (last === true) {
                            build_finish = true;
                        }
                    }
                },
                error: function(e) {
                    layer.closeAll();
                    layer.alert('生成HTML失败，请手工生成静态HTML！', {
                        icon: 5,
                        title: false
                    });
                }
            });
        }
    </script>
    <div id="goTop">
        <a href="JavaScript:void(0);" id="btntop"> <i class="fa fa-angle-up"></i>
        </a>
        <a href="JavaScript:void(0);" id="btnbottom"> <i class="fa fa-angle-down"></i>
        </a>
    </div>
    <script type="text/javascript">
        $(document).ready(function() {
            $('#think_page_trace_open').css('z-index', 99999);
        });
    </script>
    
    
    
<script>
    var vm = new Vue({
		el: '#app',
		data: {
			list: [],
			count:0,
			search:"",
			searchstatus:0,
			id:0
		},
		created(){
		    let url=window.location.search;
		    let urlParams = new URLSearchParams(url);
		    if(urlParams.get("id")){
		        this.id=urlParams.get("id");
		        this.detail();
		    }else{
		        this.details();
		    }
		    
		  //  this.searchtext=urlParams.get("searchtext");
		    
		    
		},
		mounted(){
		    
		},
		methods: {
		    detail:function(){
		        this.$http.post('api/productlist.php',{
			        tid:this.id
			    },{emulateJSON: true}).then(function(res){
			        this.list=res.body.data;
                    this.count=res.body.total;
			    },function(){
			        console.log("request fail");
			    })
		    },
		    details: function() {
			    this.$http.get('api/productlist.php').then(function(res){
                    console.log(res.body);   
                    this.list=res.body.data;
                    this.count=res.body.total;
                },function(){
                    console.log('请求失败处理');
                });
			},
			handleCurrentChange:function(p){
			    
                if(this.searchstatus){
                    this.$http.post('api/productlist.php',{
    			        page:p,
    			        select:this.searchstatus,
    			        text:this.search
    			    },{emulateJSON: true}).then(function(res){
    			        this.list=res.body.data;
                        this.count=res.body.total;
    			    },function(){
    			        console.log("request fail");
    			    })
                }else{
                    this.$http.post('api/productlist.php',{
    			        page:p
    			    },{emulateJSON: true}).then(function(res){
    			        this.list=res.body.data;
                        this.count=res.body.total;
    			    },function(){
    			        console.log("request fail");
    			    })
                }
    			    
			},
			mysearch:function(){

			    this.$http.post('api/productlist.php',{
			        text:this.search
			    },{emulateJSON: true}).then(function(res){
			        this.list=res.body.data;
                    this.count=res.body.total;
                    this.searchstatus=res.body.select;
			    },function(){
			        console.log("request fail");
			    })
			},
			del:function(aid){
			    this.$http.post('api/productlist.php',{
			        aid:aid
			    },{emulateJSON: true}).then(function(res){
			        this.list=res.body.data;
                    this.count=res.body.total;
			    },function(){
			        console.log("request fail");
			    })
			}
		}
	})
</script>

    
    
    
</body>

</html>